package com.un.ebs.sys.enums;

import lombok.Getter;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @Author zc
 * @ClassName FunctionsEnums
 * @Description
 * @Date 2021/1/11
 */
@Getter
public enum FunctionsEnums {
    QUERY("通用查询", RequestMethod.POST, "/common/query"),
    LIST("列表查询", RequestMethod.POST, "/common/%s/list"),
    PAGE_LIST("分页查询", RequestMethod.POST, "/common/%s/page/list"),
    GET_BY_ID("根据ID查询", RequestMethod.POST, "/common/%s/{id}"),
    GET_VIEW_BY_ID("根据ID查询复合对象", RequestMethod.POST, "/common/getView/%s/{id}"),
    ADD("新增", RequestMethod.POST, "/common/%s/add"),
    UPDATE("修改", RequestMethod.POST, "/common/%s/update"),
    DELETE("删除", RequestMethod.POST, "/common/%s/delete/{id}");


    private final String desc;
    private final RequestMethod requestMethod;
    private final String url;

    FunctionsEnums(String desc, RequestMethod requestMethod, String url) {
        this.desc = desc;
        this.requestMethod = requestMethod;
        this.url = url;
    }
}
